home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / file / logiso.000 / logiso / Utils / RCS / logiso_preview,v < prev    next >
Encoding:
Text File  |  1995-03-24  |  2.0 KB  |  114 lines

  1. head    1.2;
  2. access;
  3. symbols
  4.     VER_0_2:1.2;
  5. locks; strict;
  6. comment    @# @;
  7.  
  8.  
  9. 1.2
  10. date    95.03.01.07.10.23;    author coulter;    state Exp;
  11. branches;
  12. next    1.1;
  13.  
  14. 1.1
  15. date    95.02.19.09.10.40;    author coulter;    state Exp;
  16. branches;
  17. next    ;
  18.  
  19.  
  20. desc
  21. @Script to show what logiso_copy would install.
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @Checkpoint files.  Can now compress cd_files.
  28. @
  29. text
  30. @#! /bin/bash
  31. USAGE='USAGE: logiso_preview
  32.    Get the iso log and print the files that would be installed.
  33. '
  34.  
  35. # Process parameters
  36.  
  37.       if [ $# -ne 0 ]
  38.       then
  39.          echo "$USAGE" >&2
  40.          echo "Too many arguments." >&2
  41.          exit 1
  42.       fi
  43.  
  44. # Set variables
  45.  
  46.    ISOFS_UTIL_DIR="${ISOFS_UTIL_DIR:-/usr/src/linux/fs/isofs/Utils}"
  47.  
  48. # Source in user definitions
  49. # MOUNT_PATH
  50. # MAP_TO_PATH
  51. # CD_FILE
  52.  
  53.    . "${ISOFS_UTIL_DIR}/config"
  54.    export ISOFS_UTIL_DIR
  55.  
  56. # Set up temp files
  57.  
  58.     INODE_LIST="/tmp/logisoina$$"
  59.     INSTALL_LIST="/tmp/logisoinb$$"
  60.     trap "rm -f $INODE_LIST $INSTALL_LIST" 0 1 2 3 15
  61.  
  62. # Define standard functions
  63.  
  64.    . "$ISOFS_UTIL_DIR/ksh_fns"
  65.  
  66. # Do it
  67.  
  68.    logiso_get "$MOUNT_PATH" | cut -f1 | sort -n | uniq >  "$INODE_LIST"
  69.  
  70. # If CD_FILES does not exist, create it.
  71.  
  72.    USE_GZIP="FALSE"
  73.    if [ -f "${CD_FILES}.gz" -a ! -f "$CD_FILES" ]
  74.    then
  75.       USE_GZIP="TRUE"
  76.       echo "Uncompressing $CD_FILES"
  77.       gunzip "${CD_FILES}.gz"
  78.    fi
  79.    if [ ! -f "$CD_FILES" ]
  80.    then
  81.       echo "$CD_FILES does not exist."
  82.       echo "Creating it will take a while."
  83.       find  "$MOUNT_PATH" 2> /dev/null | xargs ls -i -d 2> /dev/null     \
  84.      | sort -n > "$CD_FILES" 2> /dev/null
  85.       check_return 0 1 "Error making $CD_FILE"
  86.       echo "You should probably clear the log and try again." >&2
  87.       exit 1
  88.    fi
  89.  
  90.    echo "Comparing logged inodes against list in $CD_FILES"
  91.    process_lists "$INODE_LIST" "$CD_FILES" 
  92.    if [ "$USE_GZIP" = "TRUE" ]
  93.    then
  94.       echo "Compressing $CD_FILES"
  95.       gzip "${CD_FILES}"
  96.    fi
  97. @
  98.  
  99.  
  100. 1.1
  101. log
  102. @Initial revision
  103. @
  104. text
  105. @d37 4
  106. d43 7
  107. d57 2
  108. a60 3
  109. # Do it
  110.  
  111.    logiso_get "$MOUNT_PATH" | cut -f1 | sort -n | uniq >  "$INODE_LIST"
  112. d63 5
  113. @
  114.